Skip to content

Retry on partial live branch connections responses instead of showing partial results#1275

Open
bwarminski wants to merge 6 commits into
mainfrom
bwarminski/connections-partial-cancel-fix
Open

Retry on partial live branch connections responses instead of showing partial results#1275
bwarminski wants to merge 6 commits into
mainfrom
bwarminski/connections-partial-cancel-fix

Conversation

@bwarminski

Copy link
Copy Markdown
Contributor

This fixes a couple of rough edges:

  1. Timeouts are pretty tight on the top listing calls and will return partial results. When this happens, the top view would show a banner and the latest data available, which isn't as useful as just retrying so we can get full data. This follows the same retry logic we follow on 503s, so it'll just fetch again.
  2. The little caret in the detail blocker view caused rows to shift to the right whenever they were selected instead of using the same padding as the main table
  3. On really wide screens with really short queries, the table would stretch to the center creating an ugly view. This fixes that.

Old:
01-old-good

New:
02-new-good

Tested locally with a QA run on an overloaded server.

A 200 response that flags an instance unreachable is a transient
fan-out failure under load. Retry within the existing retry budget and
fall back to the partial list on exhaustion, rather than surfacing the
degraded result on the first poll.
When the client's retries can't clear a partial-instance failure, the
TUI holds the last good frame and lets the staleness dot and captured
age surface it, instead of replacing good data with the unreachable
banner. First load (no prior frame) still shows the partial. Shared
HasUnreachableInstance moves onto ConnectionList.
Selecting a row in the detail view's blocker tree prepended a caret and
shifted the row text, a layout jump the table view doesn't have. Pad
unselected rows by the caret width so the text stays put on selection.
The default (Postgres) view rendered via lgtable, which distributes the
terminal width across columns and spreads them with large gaps when the
content (notably the trailing QUERY column) is short. Route it through the
same content-based width + manual padding layout the Vitess/processlist
view already used (generalized to tightColumnWidths / renderTightRow), so
columns stay packed at the left regardless of terminal width.
Remove the always-true i>=0 guard in the tight table renderer (carried
over from the old lgtable header-sentinel path) and the redundant
consecutiveErrors==0 assertion in the first-load partial test (the view
assertions already cover that branch).
@bwarminski bwarminski requested review from rafer and tkaemming June 15, 2026 20:07
@bwarminski bwarminski requested a review from a team as a code owner June 15, 2026 20:07

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 179b666. Configure here.

// Retry locally; the response carries no Retry-After hint.
partial, havePartial = list, true
retryAfter = 0
case isTimeoutError(err) && ctx.Err() != nil:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Timeout drops saved partial list

Medium Severity

After a partial 200 is stored for retry, the overall List timeout can fire either while waiting between attempts or inside tryList. The wait path returns the saved partial with a nil error, but the in-flight timeout path always returns a timeout error and discards havePartial, so callers see a failed refresh instead of the degraded snapshot the PR intends.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 179b666. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants